﻿package  
{
	import flash.display.MovieClip;
	import flash.display.Sprite;
	import flash.text.TextField;
	
	/**
	 * ...
	 * @author Paul Forest
	 */
	
	
	public class MatchCardUI extends MatchCardSymbol 
	{
		public var matchUIPages:Vector.<MatchedPersonUI> = new Vector.<MatchedPersonUI>();
		
		public function MatchCardUI(person:Person) 
		{
			super();
			
			fullName_txt.text = person.firstName + " " + person.lastName;
			this.hasSkills_txt.text = person.hasSkills.join(", ");
			
			var mp:MatchedPersonUI = null;
			var myY:int = 120;
			
			var len:int = person.matches.length;
			
			for (var i:int = 0; i < len; i++) {
				mp = new MatchedPersonUI(person, person.matches[i]);
				matchUIPages.push(mp);
				mp.y = myY;
				myY += mp.height;
				addChild(mp);
			}
		}
		
	}

}